﻿using System.Runtime.Serialization;
using System.ServiceModel;
using RRSimulator.BlobManager.Service.Requests;
using RRSimulator.BlobManager.Service.Responses;

namespace RRSimulator.BlobManager.Service
{
    [ServiceContract]
    public interface IBlobManager
    {
        [OperationContract]
        UploadFileResponse UploadFile(UploadFileRequest request);

        [OperationContract]
        UploadFileStreamResponse UploadFileStream(UploadFileStreamRequest request);

        [OperationContract]
        DeleteFileResponse DeleteFile(DeleteFileRequest request);

        [OperationContract]
        UploadBlockResponse UploadBlock(UploadBlockRequest request);

        [OperationContract]
        UploadBlockStreamResponse UploadBlockStream(UploadBlockStreamRequest request);

        [OperationContract]
        CommitBlocksResponse CommitBlocks(CommitBlocksRequest request);

        [OperationContract]
        TestOperationResponse TestOperation(TestOperationRequest request);
    }

    [DataContract]
    public class TestOperationResponse : BlobManagerResponseBase
    {
        [DataMember]
        public string TestString { get; set; }
    }

    [DataContract]
    public class TestOperationRequest : BlobManagerRequestBase
    {
        [DataMember]
        public string TestString { get; set; }
    }
}
